package top.guinguo.solr_06;

import org.apache.solr.client.solrj.beans.Field;

import java.util.Arrays;

/**
 * Created by guin_guo on 2017/1/9.
 */
public class Message {
    private String id;
    private String title;
    private String[] content;

    public Message() {
    }

    public Message(String id, String title, String[] content) {
        this.id = id;
        this.title = title;
        this.content = content;
    }

    public String getId() {
        return id;
    }

    @Field
    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    @Field("my_title")
    public void setTitle(String title) {
        this.title = title;
    }

    public String[] getContent() {
        return content;
    }

    @Field("my_content")
    public void setContent(String[] content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "Message{" +
                "id='" + id + '\'' +
                ", title='" + title + '\'' +
                ", content=" + Arrays.toString(content) +
                '}';
    }
}
